package yf.mall.service;

import yf.mall.entity.LotteryGoodsEntity;
import yf.mall.vo.LotteryGoodsVo;
import com.yf.service.BaseService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 中奖奖品Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Thu Aug 20 11:18:45 CST 2020
 */
public interface LotteryGoodsService extends BaseService<LotteryGoodsEntity> {

    /************自动生成**************/
    List<LotteryGoodsVo> findVo(LotteryGoodsVo vo);

        LotteryGoodsVo getVo(Long id);

     int updateVo(LotteryGoodsVo vo);

       int saveVo(LotteryGoodsVo vo);

    void downLoad(HttpServletResponse response, List<LotteryGoodsVo> list);


    /***********BACK***********/




    /***********API***********/

    /**
     * 根据活动id查询该活动下所有启用的奖品
     * @param id
     * @param status
     * @return
     */
    List<LotteryGoodsEntity> findByActId(Long id, int status);


    LotteryGoodsEntity findMaxGoods(Long actId);

    LotteryGoodsEntity findMinGoods(Long actId);

    List<LotteryGoodsEntity>  findByActIdAndStatus(Long actId, int index);
}
